<?phpnamespace app\hook;use app\traits\orderinvalid;class ordercancel{    use orderinvalid;    public function before($order)    {        \Log::out('订单取消 before，订单ID：' . $order->id, 'hook');    }    public function after($order)    {        // 订单失效        $this->invalid($order, 'cancel');        // 积分订单解冻支付积分金额        if ($order->type == 'score' && $order->score_fee > 0) {            \memberModel::unfreezeScore($order->score_fee, $order->member_id, $order->id);        }        \Log::out('订单取消 after，订单ID：' . $order->id, 'hook');    }}